<!DOCTYPE html>
<html>
<head>
<title>日期显示</title></head>
<body>
<script language = "JavaScript">
  var today = new Date();
  var day = today.getDate();        //获取日期
  var month = today.getMonth()+1;  //获取月份（月份在JavaScript里面是从0开始的）
  var year = today.getFullYear();    //获取年份
  var week = today.getDay();       //获取星期几
  var vw = new Array("星期天","星期一","星期二","星期三","星期四","星期五","星期六");
	document.write("今天是"+year+"年"+month+"月"+day+"日"+vw[week]);
</script>
</body>
</html>